package com.caregiver.watch.business.notice.enums;

import lombok.Getter;

/**
 * @Description: 通知类型枚举
 * @program: caregiver-watch
 * @author: 疆戟
 * @create: 2025-10-04 09:49
 */
@Getter
public enum NoticeTypeEnum {

    /**
     * 设备消息，健康预警
     */
    DEVICE_MESSAGE(1, "设备消息"),

    /**
     * 提醒消息
     */
    REMIND_MESSAGE(2, "提醒消息");

    private final Integer code;

    private final String message;

    NoticeTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static NoticeTypeEnum pares(Integer code) {
        for (NoticeTypeEnum value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
